<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>单文件上传</title>
</head>
<body>
    <h2>单文件上传</h2>
    <hr>

    <form action="" method="post" enctype="multipart/form-data">
        {% csrf_token %}

        <p>用户名：<input type="text" name="uname"></p>
        <p>头像：<input type="file" name="icon"></p>
        <p> <button>上传图片</button> </p>

    </form>

</body>
</html>